import request from '@/utils/request'

export function getHomeInfo() {
  return request({
    url: '/goods/home',
    method: 'get'
  })
}

export function getMayLikeGoods() {
  return request({
    url: '/goods/maylike',
    method: 'get'
  })
}

export function getAllGoodsInfo(query) {
  return request({
    url: '/goods',
    method: 'get',
    params: query
  })
}

export function getGoodsDetail(id) {
  return request({
    url: `/goods/detail/${id}`,
    method: 'get'
  })
}

export function getSearchGoodsInfo(query) {
  return request({
    url: '/goods/findGoods',
    method: 'get',
    params: query
  })
}

export function getGoodsType(query) {
  return request({
    url: '/goods/Goodstype',
    method: 'get',
    params: query
  })
}